// @ts-nocheck
import Vue from 'vue'
import App from './App.vue'
import router, { setRouter } from './router'
import store from './store'
import Antd from 'ant-design-vue/es'
import 'ant-design-vue/dist/antd.css';
import '@/style/index.scss'
import VuePrlx from 'vue-prlx'
import { VuePrlxDirective } from 'vue-prlx'
import config from "@/utils/config";
import { dateFormat } from '@/utils/timeHandler'
import vueSeamlessScroll from "vue-seamless-scroll"
import VueParticles from "vue-particles";
import dataV from "@/utils/dataV"
import uploader from 'vue-simple-uploader'
import * as echarts from 'echarts';
import L from 'leaflet'
import 'leaflet/dist/leaflet.css'
import 'leaflet.wmts'
import moment from 'moment';
import 'moment/locale/zh-cn';
// import tools from "@/utils/tools";
import YuanSelectVue from "@/components/yuanSelect.vue"
import { utilCheckPermission } from "@/utils/index"
Vue.component('vue-seamless-scroll', vueSeamlessScroll)
Vue.component('YuanSelectVue', YuanSelectVue)
Vue.prototype.$config = config
Vue.prototype.$echarts = echarts
Vue.prototype.$dateFormat = dateFormat
Vue.prototype.$utilCheckPermission = utilCheckPermission
Vue.config.productionTip = false
Vue.prototype.$filterOption = (input: any, option: any) => {
  console.info(input,option)
  return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}

Vue.use(L)
Vue.use(Antd)
Vue.use(VuePrlx);
Vue.use(VueParticles)
Vue.use(dataV)
Vue.use(uploader)

moment.locale('zh-cn');
Vue.directive('prlx', VuePrlxDirective);
// tools.printOnSpecificDay(4, "今天是星期四了", '周'+new Date().getDay(),'https://i0.hdslb.com/bfs/archive/f42efaf2bd9ebce53e5ee97b3be131a86003b1db.jpg',.3)
// tools.printOnSpecificDay(5, "明天就可以休息了", '周'+new Date().getDay(),'https://img2.huashi6.com/images/resource/2018/11/26/7183707h1p0.jpg?imageMogr2/quality/100/interlace/1/thumbnail/2000x%3E',.3)

if (process.env.NODE_ENV === 'production') {
  if (window) {
    window.console.log = function () { }
  }
}

setRouter(() => new Vue({
  router,
  store,
  render: h => h(App),
  mounted() {
    document.dispatchEvent(new Event('render-event'))
  }
}).$mount('#app'))
